package my.mybatis.common.exception;

import java.io.Serializable;
import java.util.List;

/**
 * @Author:wangbin.
 * @Description.
 * @Date:Created in 11:25 2018/1/16.
 * @Modified By:
 */
public class BaseException extends Exception implements Serializable{
	private static final long serialVersionUID = 6109955626250770462L;
	private String  code;
	private String  msg;
	private List<String> errorMessages;
	
	public BaseException(String code){
		this.code = code;
	}

	public BaseException(String code, String msg){
		this.code = code;
		this.msg = msg;
	}

	public BaseException(String code, List<String> errorMessages){
		this.code = code;
		this.errorMessages = errorMessages;
	}

	public BaseException(String code, String msg, List<String> errorMessages){
		this.code = code;
		this.msg = msg;
		this.errorMessages = errorMessages;
	}

	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		this.msg = msg;
	}
	public List<String> getErrorMessages() {
		return errorMessages;
	}
	public void setErrorMessages(List<String> errorMessages) {
		this.errorMessages = errorMessages;
	}
}
